Skip to content

feat: enhance pre-commit configuration with comprehensive hooks#101

Merged
lucas2brh merged 4 commits intomainfrom
feat/enhance-pre-commit-hooks
Aug 4, 2025
Merged

feat: enhance pre-commit configuration with comprehensive hooks#101
lucas2brh merged 4 commits intomainfrom
feat/enhance-pre-commit-hooks

Conversation

@AndyBoWu
Copy link
Member

@AndyBoWu AndyBoWu commented Aug 2, 2025

PR Notes

  • Add comprehensive pre-commit hooks for better code quality
  • trailing-whitespace: Remove trailing whitespace
  • end-of-file-fixer: Ensure files end with newline
  • check-added-large-files: Prevent large files from being committed
  • check-json: Validate JSON files
  • check-toml: Validate TOML files
  • debug-statements: Check for debugger imports
  • mixed-line-ending: Normalize line endings
  • isort: Sort imports with black-compatible profile
  • ruff: Fast Python linter with auto-fix capabilities

- Add comprehensive pre-commit hooks for better code quality
  - trailing-whitespace: Remove trailing whitespace
  - end-of-file-fixer: Ensure files end with newline
  - check-added-large-files: Prevent large files from being committed
  - check-json: Validate JSON files
  - check-toml: Validate TOML files
  - debug-statements: Check for debugger imports
  - mixed-line-ending: Normalize line endings
  - isort: Sort imports with black-compatible profile
  - ruff: Fast Python linter with auto-fix capabilities

- Update .gitignore to exclude CLAUDE.md (AI assistant configuration file)
- Maintain existing black formatter configuration
- Create DEVELOPMENT.md with detailed setup instructions
- Add uv installation guide for all platforms
- Document all pre-commit hooks and their purposes
- Include troubleshooting section for common issues
- Update README.md to reference the new development guide
- Provide clear workflow instructions for testing and formatting
- Update black from 23.12.1 to 25.1.0
- Update pre-commit-hooks from v4.5.0 to v5.0.0
- Update ruff from v0.1.9 to v0.8.4
- Keep isort at 5.13.2 (latest stable version)
- Add venv/, env/, ENV/, .venv/, virtualenv/ to .gitignore
- Prevents accidentally committing virtual environment files
- Virtual environments should always be created locally
- Reduces repository size and avoids platform-specific issues
Copy link
Contributor

@bonnie57 bonnie57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a very comprehensive hook! 👍

Could you please remove the Running test cases and Formatting sections from the README.md file? I think it's a little repetitive.

Besides, I followed up on the guide and found some issues via the new pre-commit rules. I have created another pr Please help me review it.

@lucas2brh lucas2brh merged commit e68925c into main Aug 4, 2025
12 checks passed
@lucas2brh lucas2brh deleted the feat/enhance-pre-commit-hooks branch August 4, 2025 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants